using System;

namespace Prometheus.Binding.Validation.Rules
{
    /// <summary>
    /// Details for validation result
    /// </summary>
    public class proValidationException : Exception
    {
        #region Constructors

        public proValidationException(string message)
            : this(proValidationResultType.Error, message)
        {
        }

        public proValidationException(proValidationResultType type, string message)
        {
            _type = type;
            _message = message;
        }

        #endregion

        private readonly string _message;
        private readonly proValidationResultType _type;

        public proValidationResultType Type
        {
            get { return _type; }
        }

        public new string Message
        {
            get { return _message; }
        }

        public override string ToString()
        {
            return Message;
        }
    }
}